@echo off
chcp 65001
echo "#添加本地镜像"
echo "vagrant box add 镜像名称 box路径"
echo "vagrant box add centos7 CentOS-7.box"
echo "vagrant box add c7 CentOS-7.box"
echo "#查看当前有那些box列表"
echo "vagrant box list "
echo "#初始化，当前文件夹会生成一个VagrantFile"
echo "vagrant init 镜像名称"
echo "#对VagrantFile配置好后就可以启动了"
echo "vagrant up"
echo ""
echo "cd c7" 
echo "vagrant up"

echo "命令通过SSH登录到虚拟机中"
echo "vagrant ssh"

echo "默认是不开启密码验证的,会导致tabby终端无法连接"
echo "所有的密码一律都是vagrant, root用户的vagrant"
echo "为了终端可以正常连接到虚拟机中,需要开启密码验证"

echo "su root #切换超级管理员"
echo "vi /etc/ssh/sshd_config	#修改PasswordAuthentication为yes"
echo "$systemctl restart sshd	#重启sshd服务"
echo "修改完成后,无须重启服务器,直接使用终端连接即可"

pause